import logging
def get_log(name='test_logger'):
    logger=logging.getLogger(name)
    if not logger.handlers:
        fmt=logging.Formatter("%(asctime)s-%(levelname)s-%(message)s-%(filename)s")
        file_hd=logging.FileHandler('rizhi.log',encoding='utf_8')
        file_hd.setFormatter(fmt)
        logger.addHandler(file_hd)

        kong_hd=logging.StreamHandler()
        kong_hd.setFormatter(fmt)
        logger.addHandler(kong_hd)

        logger.setLevel(logging.INFO)
    return logger